<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>JS 会触发页面渲染</title>
        <style>
        p {
          color: lightgreen;
        }
      </style>
    </head>

    <body>
        <p>hello</p>
        <script src="./static/index.js?sleep=2000"></script>
        <p>beautiful</p>
        <style>
        p {
          color: pink;
        }
      </style>
        <script src="./static/index.js?sleep=4000"></script>
        <p>world</p>
        <style>
        p {
          color: lightblue;
        }
      </style>
    </body>

    // static/index.js
    var p = document.querySelector('p')
    var style = window.getComputedStyle(p, null)

    console.log(style.color)
</html>